package com.leetcode;

public class LeetCode1410 {

    public String entityParser(String text) {
        String replace = text.replaceAll("&quot;", "\"")
                .replaceAll("&apos;", "'")
                .replaceAll("&gt;", ">")
                .replaceAll("&lt;", "<")
                .replaceAll("&frasl;", "/")
                .replaceAll("&amp;", "&");
        return replace;
    }

    public static void main(String[] args) {
        LeetCode1410 leetCode1410 = new LeetCode1410();
        String text = "&amp;gt;";
        System.out.println(leetCode1410.entityParser(text));
    }
}
